/*
 * This is java.util.Random following Randomizer interface
 */
package org.yagnus.stats.sampler;

/**
 * 
 * @author hc.busy
 */
public final class JavaUtilRandom implements RandomNumberGenerator {

    final java.util.Random rng = new java.util.Random();

    public final synchronized void setSeed(final long seed) {
        rng.setSeed(seed);
    }

    public final long nextLong() {
        return rng.nextLong();
    }

    public final int nextInt(int n) {
        return rng.nextInt(n);
    }

    public final int nextInt() {
        return rng.nextInt();
    }

    public final synchronized double nextGaussian() {
        return rng.nextGaussian();
    }

    public final float nextFloat() {
        return rng.nextFloat();
    }

    public final double nextDouble() {
        return rng.nextDouble();
    }

    public final void nextBytes(final byte[] bytes) {
        rng.nextBytes(bytes);
    }

    public final boolean nextBoolean() {
        return rng.nextBoolean();
    }
}
